-
Notifications
You must be signed in to change notification settings - Fork 698
Feat/sip 031 boot contract #6261
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: release/3.2.0.0.0-rc1
Are you sure you want to change the base?
Feat/sip 031 boot contract #6261
Conversation
…ip_031_boot_contract
@rdeioris I merged in the release branch just have this branch's diff (which I'm also building on top of) more clean, hope you don't mind! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
@hstove added a bunch of checks for the mint receipt in the integration test. Please re-review. thanks! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good to me, just had a few superficial comments, and would like to see an additional check in the test for the liquid stx supply.
|
||
let mut sip_031_initialization_receipt = self.as_transaction(|tx_conn| { | ||
// initialize with a synthetic transaction | ||
debug!("Instantiate {} contract", &sip_031_contract_id); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might as well make this info!
-- we only expect this to happen the one time.
ASTRules::PrecheckSize, | ||
None, | ||
) | ||
.expect("FATAL: Failed to process .sip031 contract initialization"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.expect("FATAL: Failed to process .sip031 contract initialization"); | |
.expect("FATAL: Failed to process .sip-031 contract initialization"); |
}; | ||
|
||
let boot_code_address = boot_code_addr(mainnet); | ||
let boot_code_auth = boot_code_tx_auth(boot_code_address.clone()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let boot_code_auth = boot_code_tx_auth(boot_code_address.clone()); | |
let boot_code_auth = boot_code_tx_auth(boot_code_address); |
); | ||
} | ||
|
||
let recipient = PrincipalData::Contract(boot_code_id(SIP_031_NAME, mainnet)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let recipient = PrincipalData::Contract(boot_code_id(SIP_031_NAME, mainnet)); | |
let recipient = PrincipalData::Contract(sip_031_contract_id); |
@@ -12756,6 +12760,121 @@ fn test_sip_031_activation() { | |||
|
|||
assert_eq!(epoch_version, Some(StacksEpochId::Epoch32)); | |||
|
|||
// check if sip-031 boot contract has been deployed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you also add a check that the liquid ustx supply has incremented correctly?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good! I just had some very minor comments.
@@ -12635,7 +12639,7 @@ fn write_signer_update( | |||
/// Test SIP-031 activation | |||
/// | |||
/// - check epoch 3.2 is active | |||
/// - TODO: check sip031 boot contract has a balance of 200_000_000 STX (TODO) | |||
/// - check sip031 boot contract has a balance of 200_000_000 STX (TODO) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/// - check sip031 boot contract has a balance of 200_000_000 STX (TODO) | |
/// - check sip031 boot contract has a balance of 200_000_000 STX |
.unwrap() | ||
.as_str() | ||
.unwrap(), | ||
"200000000000000" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"200000000000000" | |
SIP_031_INITIAL_MINT.to_string(), |
Description
This is the boot-contract and management for SIP-031 initial mint and assignment.
During the epoch-32 activation, 200_000_000 STX are minted and trasferred to the contract.
The contract is still a stub
Applicable issues
Additional info (benefits, drawbacks, caveats)
Checklist
docs/rpc/openapi.yaml
andrpc-endpoints.md
for v2 endpoints,event-dispatcher.md
for new events)clarity-benchmarking
repobitcoin-tests.yml